﻿using Factory.RBAC.Accounts.Dto;
using Factory.RBAC.Roles.DTO.UpdateDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace Factory.RBAC.Roles
{
    public interface IRoleAppService:IApplicationService
    {
        /// <summary>
        /// 角色显示（分页）
        /// </summary>
        /// <param name="page">页面</param>
        /// <param name="limit">页容量</param>
        /// <param name="accountName">用户名</param>
        /// <returns></returns>
        Task<PagedResult> Display(int page, int limit, string? accountName);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Delete(int id);


        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns>返回受影响行数</returns>
        Task<Role> Backfill(int id);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="account">用户实体</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Add(Role account);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="account">修改DTO</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Update(UpdateRoleDto account);

    }
}
